Accessibility

Working Around Macromedia Flash and FreeHand Rendering Differences (Line Scaling)

Every now and then, an element that you have created in FreeHand (or even from within Macromedia Flash) ends up looking far different than you would expect under certain situations. This can be frustrating. In this section, I will clarify some things about how to deal with how scaled vector lines render in Macromedia Flash and show you strategies for working around some rendering problems. If you follow this section, you may save a great deal of time later on.

If you were paying attention to the fourth logo in the above Macromedia Flash piece, you may have noticed that the stars around the logo seem very dark compared to how the logo looked inside FreeHand MX and the higher resolution GIF. Take a closer look below in figure 28:

Figure 28: Taking a closer look at the previous logo

Figure 28: Taking a closer look at the previous logo

This "different look" in Macromedia Flash Player has little to do with the FreeHand SWF export, rather, it stems from the way Macromedia Flash renders fixed or minimum line widths—regardless of scale. This happens with artwork created inside Macromedia Flash as well. In fact, a fixed line width is truly a generic feature of all vector illustration software—and the root problem in this particular situation.

If you have worked in Macromedia Flash for a while, you may have encountered some rendering problems where the line color starts to crowd out the fill color on vector shapes. In this section, you will find some valuable tips for coercing better rendering out of Macromedia Flash when this problems occurs.

Here's a demo of the line weight problem from within Macromedia Flash MX. First, I will draw a simple graphic right into the timeline, using the Macromedia Flash drawing tools.

Figure 29: A simple graphic in the timeline

Figure 29: A simple graphic in the timeline

Next, I will take this simple drawing and scale it, in a number of ways, to demonstrate what can happen when you scale the line art.

Figure 30: Scaling the simple drawing in several ways

Figure 30: Scaling the simple drawing in several ways

In Column A, see the heart of the problem. When you scale vector graphics that exist solely in the timeline (not as a symbol), the tool scales the size of the shape, but it does not scale the line width on the graphics—it remains fixed. Grouping the graphic before you scale also does not help.

In Column B, see the results of our "Primary Solution," which is to take the art from A1, and turn it into a symbol in the Macromedia Flash library (a movie clip in this case). When you scale the symbol in the Macromedia Flash timeline, Macromedia Flash will scale the line width relative to the scale of the symbol. This works quite well in most cases. There's only one catch—Macromedia Flash has a minimum line width setting of .25. Once your line width reaches this size, Macromedia Flash cannot draw them any smaller. Therefore, certain kinds of art with many tiny lines to begin with will still reach a point where the rendering is all line and no fill.

In Column C, see the "Extreme Solution," which can really work wonders with certain kinds of problematic line-rich artwork. In this case, I also created a symbol, but took it another step by selecting all of the lines in the graphic and converting them to fills. This is "extreme" because it makes the art work much more difficult to edit. You should create a backup of the symbol before you convert the lines to fills. To convert line to fills, simply select the lines you wish to convert, and select the menu command: Modify > Shape > Convert Lines to Fills.

In general, it is very important to move your "actual size" (100% scale) artwork into a symbol before you scale it to a parent time line, especially if you intend to convert lines to fills. If you select actual vectors and scale the original artwork down in Macromedia Flash (as opposed to scaling a symbol down) you can destroy, erode, or even delete vectors altogether.

So what does this have to do with the FreeHand logo, which displays differently in the Macromedia Flash export? Knowing the above information about line widths, export the logo as a SWF and import it into Macromedia Flash MX. This way, you can see how FreeHand groups the vectors during the conversion process.

Figure 31: How FreeHand groups the vectors during the conversion process

Figure 31: How FreeHand groups the vectors during the conversion process

Our goal is to make the Macromedia Flash version of the logo look more like it does in FreeHand when rendered at smaller scales in the Logo Browser Project. As a first test, let's put this whole logo into a new Macromedia Flash symbol and scale it down:

Figure 32: Putting the logo into a new Macromedia Flash symbol

Figure 32: Putting the logo into a new Macromedia Flash symbol

Remember that the "Primary Solution" I wrote about above called for putting the graphics into a symbol, but FreeHand has already put the stars in a symbol for us, thereby causing a minimum line size problem. Those tiny stars are so tiny, the fill gets obscured by the smallest line width inside Macromedia Flash.

It is time to bring out the Extreme Solution!

Figure 33: The Extreme Solution

Figure 33: The Extreme Solution

In the above example, I simply selected the lines on the most frequently used star symbol and used the "Convert Lines to Fills" command. Let's see the results of that maneuver:

Figure 34: The result of using the Convert Lines to Fills command

Figure 34: The result of using the Convert Lines to Fills command

As you can see, many of the stars around the logo now appear almost exactly as they do inside the FreeHand window. We can do the same trick on the remaining stars symbols, and call this operation a success.

You may encounter the inverse problem to the minimum line width, which is the maximum line width problem! There are situations where you scale art work higher than 100%, and the lines appear too thin. You can use the above techniques to deal with this problem too.

You could instead use an alternate route: Convert to Image.

However, there is another option inside of FreeHand MX. Although this solution is neither the most elegant solution, nor the best choice for file size and quality issues, it is quick, easy, and very reliable. Find this feature, called "Convert to Image," in FreeHand, on the menu: Modify > Convert to Image:

Figure 35: The Convert to Image feature

Figure35: The Convert to Image feature

To turn any FreeHand selection into a bitmap, choose Convert to Image from the Modify menu. Say goodbye to vectors and hello to safe, reliable bitmaps! Never use your original: always perform this operation on a copy of your original. You do not want to lose your vectors forever.

By converting the problem logo to a image (bitmap), your Macromedia Flash presentation would look the same as it does in FreeHand. However, you should consider this a hack method with some drawbacks: You increase file size and your printing quality suffers. In short, your Macromedia Flash presentation would no longer scale as effectively.

Figure 36: Increasing the resolution of the bitmapped image during conversion

Figure 36: Increasing the resolution of the bitmapped image during conversion

You can work around some of this problem by increasing the resolution of the bitmapped image during conversion.

Figure 37: Increasing the resolution of the bitmapped image

Figure 37: Increasing the resolution of the bitmapped image

However, a higher resolution can greatly increase the file size of your presentation.

If you can accept the drawbacks of using bitmaps in place of pristine vectors, then always remember that you have the Convert to Image option in FreeHand MX, and this option is completely compatible with SWF export.

Note: There is another technique that I have used, that I will mention in passing: separating lines and fills into two separate layers, with the fill layer in front of the line layer. In situations where you really need to preserve your line art while moving drastically between different sizes, this has some advantages worth looking into.

Submit your feedback about DevNet.